package cn.home.sysmanagement.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.home.sysmanagement.mapper.HomeMedicinetypeMapper;
import cn.home.sysmanagement.domain.HomeMedicinetype;
import cn.home.sysmanagement.service.IHomeMedicinetypeService;

/**
 * 药品类型Service业务层处理
 * 
 * @author homedoctor
 * @date 2025-04-09
 */
@Service
public class HomeMedicinetypeServiceImpl implements IHomeMedicinetypeService 
{
    @Autowired
    private HomeMedicinetypeMapper homeMedicinetypeMapper;

    /**
     * 查询药品类型
     * 
     * @param id 药品类型主键
     * @return 药品类型
     */
    @Override
    public HomeMedicinetype selectHomeMedicinetypeById(Long id)
    {
        return homeMedicinetypeMapper.selectHomeMedicinetypeById(id);
    }

    /**
     * 查询药品类型列表
     * 
     * @param homeMedicinetype 药品类型
     * @return 药品类型
     */
    @Override
    public List<HomeMedicinetype> selectHomeMedicinetypeList(HomeMedicinetype homeMedicinetype)
    {
        return homeMedicinetypeMapper.selectHomeMedicinetypeList(homeMedicinetype);
    }

    /**
     * 新增药品类型
     * 
     * @param homeMedicinetype 药品类型
     * @return 结果
     */
    @Override
    public int insertHomeMedicinetype(HomeMedicinetype homeMedicinetype)
    {
        return homeMedicinetypeMapper.insertHomeMedicinetype(homeMedicinetype);
    }

    /**
     * 修改药品类型
     * 
     * @param homeMedicinetype 药品类型
     * @return 结果
     */
    @Override
    public int updateHomeMedicinetype(HomeMedicinetype homeMedicinetype)
    {
        return homeMedicinetypeMapper.updateHomeMedicinetype(homeMedicinetype);
    }

    /**
     * 批量删除药品类型
     * 
     * @param ids 需要删除的药品类型主键
     * @return 结果
     */
    @Override
    public int deleteHomeMedicinetypeByIds(Long[] ids)
    {
        return homeMedicinetypeMapper.deleteHomeMedicinetypeByIds(ids);
    }

    /**
     * 删除药品类型信息
     * 
     * @param id 药品类型主键
     * @return 结果
     */
    @Override
    public int deleteHomeMedicinetypeById(Long id)
    {
        return homeMedicinetypeMapper.deleteHomeMedicinetypeById(id);
    }
}
